package com.gf.snoopy.constants.enumc;
/**
 * 
 * @author yesi
 * 利息种类
 *
 */
public enum InterestType {
	SOLID(0,"固定利率"),
	FLOAT(1,"浮动利率"),
	NONE(2,"无利率");
	
	private Integer code;
	
	private String desc;
	
	private InterestType(Integer code, String desc){
		this.setCode(code);
		this.setDesc(desc);
	}
	
	public static InterestType parse(Integer code){
		for(InterestType type:InterestType.values()){
			if(type.getCode().equals(code)){
				return type;
			}
		}
		return null;
	}

	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}
	
	
}
